package com.hyk.entity.response;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.hyk.entity.Address;
import com.hyk.entity.OrderProduct;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Order对象", description="")
public class OrderResponse implements Serializable {

    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "0:已失效，1:待付款，2:待收货，3待评价，4已完成")
    private Integer orderStatus;

    @ApiModelProperty(value = "订单价格")
    private BigDecimal orderPrice;

    @ApiModelProperty("订单商品")
    private List<OrderProduct> products;

    @ApiModelProperty("用户地址")
    private Address address;

    @ApiModelProperty("所属人")
    private String userName;

//    @ApiModelProperty(value = "地址主键")
//    private Long addressId;

    private Date createTime;

    private Date updateTime;

}
